﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BusinessLogic.Interfaces;

namespace BusinessLogic
{
    // класс, через который централизованно происходит обмен данными в приложении
    public class DataManager
    {
        private IUsersRepository usersRepository;
        private IProfilesRepository profilesRepository;
        private IDepartmentsRepository departmentsRepository;
        private PrimaryMembershipProvider provider;
        private IRolesRepository rolesRepository;
        private IDishesRepository dishesRepository;
        private IMenusRepository menusRepository;

        public DataManager(IUsersRepository usersRepository,
            IProfilesRepository profilesRepository,
            IDepartmentsRepository departmentsRepository,
            PrimaryMembershipProvider provider,
            IRolesRepository rolesRepository,
            IDishesRepository dishesRepository,
            IMenusRepository menusRepository)
        {
            this.usersRepository = usersRepository;
            this.profilesRepository = profilesRepository;
            this.departmentsRepository = departmentsRepository;
            this.provider = provider;
            this.rolesRepository = rolesRepository;
            this.dishesRepository = dishesRepository;
            this.menusRepository = menusRepository;
        }
        
        public IUsersRepository Users { get { return usersRepository; } }
        public IProfilesRepository Profiles { get { return profilesRepository; } }
        public IDepartmentsRepository Departments { get { return departmentsRepository; } }
        public PrimaryMembershipProvider MembershipProvider { get { return provider; } }
        public IRolesRepository Roles { get {return rolesRepository;} }
        public IDishesRepository Dishes { get { return dishesRepository; } }
        public IMenusRepository Menus { get { return menusRepository; } }
    }
}
